<?php $this->pageTitle=Yii::app()->name; ?>
<div id="main-content">
<?php
$this->breadcrumbs=array('Home Page');
$this->widget('application.components.MainContentBox',
                    array('title'=>'Newest Events',
                        'content'=>$this->renderPartial('_eventnew', array('model'=>$model['model_news']), true),
));

$this->widget('application.components.MainContentBox',
                    array('title'=>'Time\'s Events',
                        'content'=>$this->renderPartial('_tabtime', array('model'=>$model['model_time']), true),
));


?>
</div>

<!--  Sidebar without Layouts  --> 
<div id="sidebar">
    <div class="sidebar-box border-line">
        <div class="sidebar-title">Search Events</div>
        <div class="sidebar-content">
            <?php $this->widget("application.components.Search");?>
        </div>
    </div>
    <div class="sidebar-box border-line">
        <div class="sidebar-title">Categories</div>
        <div class="sidebar-content">
        <span><?php echo CHtml::link('Events by Type', array('event/type')); ?></span>
        <ul>
    <?php 
    $model = Typeevent::model()->findAll(array('order'=>'name')); 
    foreach ($model as $type): ?>
            <li><?php echo CHtml::link(CHtml::encode($type['name']), array('event/category', 'type'=>$type['name'])); ?></li>
    <?php endforeach; ?>
        </ul>
        <div class="clear"></div>
        <span><?php echo CHtml::encode('Events by Times'); ?></span>
    
    <?php $this->widget('zii.widgets.CMenu', array('items'=>array(
        array('label'=>'Today', 'url'=>array('/event/time', 'time'=>'today')),
    	array('label'=>'Tomorrow', 'url'=>array('/event/time', 'time'=>'tomorrow')),
    	array('label'=>'This Week', 'url'=>array('/event/time', 'time'=>'thisweek')),
        array('label'=>'This Month', 'url'=>array('/event/time', 'time'=>'thismonth')),
        array('label'=>'All Events', 'url'=>array('/event')),
    )));?>
        </div>
        <div class="clear"></div>
    </div>
    
    
    
    <div class="sidebar-box border-line">
        <div class="sidebar-title">Advertisments</div>
        <div class="sidebar-content">
            Ads Here (260px * 150px)
        </div>
    </div>
</div>
<div class="clear"></div>